<!DOCTYPE html>
<html lang="en-US">
	
<!-- Mirrored from vkuviewdoc.fsq.pub/components/common.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 May 2025 17:31:00 GMT -->
<head>
		<title>内置样式 | uView Vue3.0 横空出世，继承uView1.0意志，再战江湖，风云再起！</title>
		<meta charset="utf-8">
		<script>
		  var _hmt = _hmt || [];
		  (function() {
		    var hm = document.createElement("script");
		    hm.src = "../../hm.baidu.com/hm34bd.js?1d1565dd0782e66106e6a42c79ed2554";
		    var s = document.getElementsByTagName("script")[0]; 
		    s.parentNode.insertBefore(hm, s);
		  })();
		  </script>
		<meta name="description" content="同时支持 Vue3.0 和 Vue2.0，你没看错，现在 uView 支持 Vue3.0 了！（不支持nvue，此版本为uView1.0的分支）">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="keywords" content="vk-uview,uviewVue3.0,uview,uView,uviewui,uview ui,uviewUI,uViewui,uViewUI,uView UI,uni ui,uni UI,uni-app ui框架,uni-app UI框架,uniapp ui,ui,UI框架,uniapp ui框架,uniapp UI">
		<link rel="preload" href="../assets/css/0.styles.61168ff3.css" as="style"><link rel="preload" href="../assets/js/app.06a5b7ec.js" as="script"><link rel="preload" href="../assets/js/3.b1cc55a0.js" as="script"><link rel="preload" href="../assets/js/4.4b844322.js" as="script"><link rel="preload" href="../assets/js/75.b4e8bf21.js" as="script"><link rel="preload" href="../assets/js/9.ba52e2b0.js" as="script"><link rel="preload" href="../assets/js/6.2c513bee.js" as="script"><link rel="prefetch" href="../assets/js/1.98a9916e.js"><link rel="prefetch" href="../assets/js/10.038f08bd.js"><link rel="prefetch" href="../assets/js/100.a4e49f4f.js"><link rel="prefetch" href="../assets/js/101.5bb80e81.js"><link rel="prefetch" href="../assets/js/102.341da24c.js"><link rel="prefetch" href="../assets/js/103.59b833cd.js"><link rel="prefetch" href="../assets/js/104.a145c535.js"><link rel="prefetch" href="../assets/js/105.c8fea0c4.js"><link rel="prefetch" href="../assets/js/106.d1e658a7.js"><link rel="prefetch" href="../assets/js/107.5f95aed3.js"><link rel="prefetch" href="../assets/js/108.8d2b2544.js"><link rel="prefetch" href="../assets/js/109.10c99e03.js"><link rel="prefetch" href="../assets/js/11.8e74d8b9.js"><link rel="prefetch" href="../assets/js/110.4a7e9307.js"><link rel="prefetch" href="../assets/js/111.773e8680.js"><link rel="prefetch" href="../assets/js/112.c7465195.js"><link rel="prefetch" href="../assets/js/113.b86e8be8.js"><link rel="prefetch" href="../assets/js/114.9ba8246a.js"><link rel="prefetch" href="../assets/js/115.48e5c3e4.js"><link rel="prefetch" href="../assets/js/116.623d8a73.js"><link rel="prefetch" href="../assets/js/117.d9fc756d.js"><link rel="prefetch" href="../assets/js/118.668a7d9f.js"><link rel="prefetch" href="../assets/js/119.6ca5a6b7.js"><link rel="prefetch" href="../assets/js/12.1490d9ad.js"><link rel="prefetch" href="../assets/js/120.8008a6be.js"><link rel="prefetch" href="../assets/js/121.29c37c36.js"><link rel="prefetch" href="../assets/js/122.00c188a8.js"><link rel="prefetch" href="../assets/js/123.22e24add.js"><link rel="prefetch" href="../assets/js/124.e5837e2d.js"><link rel="prefetch" href="../assets/js/125.bd96786c.js"><link rel="prefetch" href="../assets/js/126.e58693e0.js"><link rel="prefetch" href="../assets/js/127.7df2a7cb.js"><link rel="prefetch" href="../assets/js/128.46d0d44f.js"><link rel="prefetch" href="../assets/js/129.533ad2e4.js"><link rel="prefetch" href="../assets/js/13.26869a5e.js"><link rel="prefetch" href="../assets/js/130.33870daa.js"><link rel="prefetch" href="../assets/js/131.6ed8ceeb.js"><link rel="prefetch" href="../assets/js/132.ddabb1d9.js"><link rel="prefetch" href="../assets/js/133.9ec99fba.js"><link rel="prefetch" href="../assets/js/134.ddf9fd84.js"><link rel="prefetch" href="../assets/js/135.c78b3861.js"><link rel="prefetch" href="../assets/js/136.9f35dad7.js"><link rel="prefetch" href="../assets/js/137.f76e23c3.js"><link rel="prefetch" href="../assets/js/138.527154ce.js"><link rel="prefetch" href="../assets/js/139.20fc60a7.js"><link rel="prefetch" href="../assets/js/14.f7c8080a.js"><link rel="prefetch" href="../assets/js/140.94a3c889.js"><link rel="prefetch" href="../assets/js/141.dbec7630.js"><link rel="prefetch" href="../assets/js/142.01e40518.js"><link rel="prefetch" href="../assets/js/143.e69db0a4.js"><link rel="prefetch" href="../assets/js/144.6b44c549.js"><link rel="prefetch" href="../assets/js/145.be0da9a2.js"><link rel="prefetch" href="../assets/js/146.cf66d7a5.js"><link rel="prefetch" href="../assets/js/147.0d33398d.js"><link rel="prefetch" href="../assets/js/148.7ec3725c.js"><link rel="prefetch" href="../assets/js/149.94b68d3b.js"><link rel="prefetch" href="../assets/js/15.9c539d25.js"><link rel="prefetch" href="../assets/js/150.a3cb5d67.js"><link rel="prefetch" href="../assets/js/151.353415e1.js"><link rel="prefetch" href="../assets/js/152.a0e625f0.js"><link rel="prefetch" href="../assets/js/153.9f9ff9df.js"><link rel="prefetch" href="../assets/js/154.3926195f.js"><link rel="prefetch" href="../assets/js/155.4ff0eab8.js"><link rel="prefetch" href="../assets/js/156.30421ecd.js"><link rel="prefetch" href="../assets/js/16.9311470f.js"><link rel="prefetch" href="../assets/js/17.1d2427af.js"><link rel="prefetch" href="../assets/js/18.9f71dea7.js"><link rel="prefetch" href="../assets/js/19.2b0b9da7.js"><link rel="prefetch" href="../assets/js/20.4e7fd7f2.js"><link rel="prefetch" href="../assets/js/21.eeb64d6d.js"><link rel="prefetch" href="../assets/js/22.eeed70a0.js"><link rel="prefetch" href="../assets/js/23.ebadd966.js"><link rel="prefetch" href="../assets/js/24.623888d6.js"><link rel="prefetch" href="../assets/js/25.997678dc.js"><link rel="prefetch" href="../assets/js/26.bdc2a6fc.js"><link rel="prefetch" href="../assets/js/27.14956264.js"><link rel="prefetch" href="../assets/js/28.3e836b17.js"><link rel="prefetch" href="../assets/js/29.88996b95.js"><link rel="prefetch" href="../assets/js/30.26760ff7.js"><link rel="prefetch" href="../assets/js/31.169925f0.js"><link rel="prefetch" href="../assets/js/32.fc848ffd.js"><link rel="prefetch" href="../assets/js/33.4a7b20b5.js"><link rel="prefetch" href="../assets/js/34.080a5b2d.js"><link rel="prefetch" href="../assets/js/35.5664384b.js"><link rel="prefetch" href="../assets/js/36.e6f2d7c1.js"><link rel="prefetch" href="../assets/js/37.7fffb245.js"><link rel="prefetch" href="../assets/js/38.2a818c4b.js"><link rel="prefetch" href="../assets/js/39.b75d1d1f.js"><link rel="prefetch" href="../assets/js/40.eebb261c.js"><link rel="prefetch" href="../assets/js/41.f590ad3d.js"><link rel="prefetch" href="../assets/js/42.3a5a9ad1.js"><link rel="prefetch" href="../assets/js/43.315af682.js"><link rel="prefetch" href="../assets/js/44.e699cfc9.js"><link rel="prefetch" href="../assets/js/45.070488b1.js"><link rel="prefetch" href="../assets/js/46.29f9b10c.js"><link rel="prefetch" href="../assets/js/47.a49c9691.js"><link rel="prefetch" href="../assets/js/48.901960ce.js"><link rel="prefetch" href="../assets/js/49.90f26de6.js"><link rel="prefetch" href="../assets/js/5.1822a725.js"><link rel="prefetch" href="../assets/js/50.d98ea474.js"><link rel="prefetch" href="../assets/js/51.7e81edb0.js"><link rel="prefetch" href="../assets/js/52.ae744cc4.js"><link rel="prefetch" href="../assets/js/53.a87579ea.js"><link rel="prefetch" href="../assets/js/54.09cf1cd4.js"><link rel="prefetch" href="../assets/js/55.8dbe32a9.js"><link rel="prefetch" href="../assets/js/56.4cc4e86e.js"><link rel="prefetch" href="../assets/js/57.5fa9755d.js"><link rel="prefetch" href="../assets/js/58.8a511947.js"><link rel="prefetch" href="../assets/js/59.7f699905.js"><link rel="prefetch" href="../assets/js/60.5cd6bf05.js"><link rel="prefetch" href="../assets/js/61.8e3a5252.js"><link rel="prefetch" href="../assets/js/62.c196204b.js"><link rel="prefetch" href="../assets/js/63.cf346896.js"><link rel="prefetch" href="../assets/js/64.0525bb5d.js"><link rel="prefetch" href="../assets/js/65.2d0a71fc.js"><link rel="prefetch" href="../assets/js/66.7155e206.js"><link rel="prefetch" href="../assets/js/67.40077362.js"><link rel="prefetch" href="../assets/js/68.5bf58e97.js"><link rel="prefetch" href="../assets/js/69.d955f75b.js"><link rel="prefetch" href="../assets/js/7.1d1f1c24.js"><link rel="prefetch" href="../assets/js/70.a8cce98b.js"><link rel="prefetch" href="../assets/js/71.da703543.js"><link rel="prefetch" href="../assets/js/72.c04dfa52.js"><link rel="prefetch" href="../assets/js/73.d07ef280.js"><link rel="prefetch" href="../assets/js/74.8461f6a0.js"><link rel="prefetch" href="../assets/js/76.2df0e4fa.js"><link rel="prefetch" href="../assets/js/77.80fba507.js"><link rel="prefetch" href="../assets/js/78.167eb1f2.js"><link rel="prefetch" href="../assets/js/79.8de07f16.js"><link rel="prefetch" href="../assets/js/8.70b4860e.js"><link rel="prefetch" href="../assets/js/80.62ae9ff8.js"><link rel="prefetch" href="../assets/js/81.6d66b374.js"><link rel="prefetch" href="../assets/js/82.3200cf78.js"><link rel="prefetch" href="../assets/js/83.1d9c3fce.js"><link rel="prefetch" href="../assets/js/84.d9f947a9.js"><link rel="prefetch" href="../assets/js/85.85a4c72a.js"><link rel="prefetch" href="../assets/js/86.93c948f9.js"><link rel="prefetch" href="../assets/js/87.468468cc.js"><link rel="prefetch" href="../assets/js/88.e5fe3f13.js"><link rel="prefetch" href="../assets/js/89.724b1038.js"><link rel="prefetch" href="../assets/js/90.16fb68a1.js"><link rel="prefetch" href="../assets/js/91.338ca55d.js"><link rel="prefetch" href="../assets/js/92.508f7300.js"><link rel="prefetch" href="../assets/js/93.50d169d1.js"><link rel="prefetch" href="../assets/js/94.54461a32.js"><link rel="prefetch" href="../assets/js/95.8f712236.js"><link rel="prefetch" href="../assets/js/96.4c8d5f01.js"><link rel="prefetch" href="../assets/js/97.da347ee4.js"><link rel="prefetch" href="../assets/js/98.94680b58.js"><link rel="prefetch" href="../assets/js/99.7d895609.js">
		<link rel="stylesheet" href="../assets/css/0.styles.61168ff3.css">
		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				hm.src = "../../hm.baidu.com/hm81c3.js?43e7eadc8f61e1e064906952da7d51f0";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(hm, s);
			})();
		</script>
	</head>
	<body>
		<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="../index.html" class="home-link router-link-active"><img src="../common/logo.png" alt="uView Vue3.0 横空出世，继承uView1.0意志，再战江湖，风云再起！" class="logo"> <span class="site-name can-hide">uView</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="../guide/demo.html" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="intro.html" class="nav-link">
  组件
</a></div><div class="nav-item"><a href="../js/intro.html" class="nav-link">
  JS
</a></div><div class="nav-item"><a href="../layout/intro.html" class="nav-link">
  模板
</a></div><div class="nav-item"><a href="resource.html" class="nav-link">
  资源
</a></div><div class="nav-item"><a href="https://ext.dcloud.net.cn/plugin?id=6692" target="_blank" rel="noopener noreferrer" class="nav-link external">
  插件市场
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://gitee.com/vk-uni/vk-uview-ui" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="DCloud插件市场" class="dropdown-title"><span class="title">VK其他插件</span> <span class="arrow down"></span></button> <button type="button" aria-label="DCloud插件市场" class="mobile-dropdown-title"><span class="title">VK其他插件</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=2204" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-unicloud-router（client端）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=5043" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-unicloud-admin（admin端）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=5642" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-uni-pay（统一支付）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=2848" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-data-goods-sku-popup（sku组件）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=6692" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-uview-ui（uView Vue3.0）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=6158" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-redis
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=6089" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-unicloud数据库一键搬家工具
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=6663" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-hbx插件（开发辅助工具）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/publisher?id=164406" target="_blank" rel="noopener noreferrer" class="nav-link external">
  查看更多
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="原版uView" class="dropdown-title"><span class="title">原版uView</span> <span class="arrow down"></span></button> <button type="button" aria-label="原版uView" class="mobile-dropdown-title"><span class="title">原版uView</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://v1.uviewui.com/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  1.X
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://uviewui.com/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  2.X
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div><aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="../guide/demo.html" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="intro.html" class="nav-link">
  组件
</a></div><div class="nav-item"><a href="../js/intro.html" class="nav-link">
  JS
</a></div><div class="nav-item"><a href="../layout/intro.html" class="nav-link">
  模板
</a></div><div class="nav-item"><a href="resource.html" class="nav-link">
  资源
</a></div><div class="nav-item"><a href="https://ext.dcloud.net.cn/plugin?id=6692" target="_blank" rel="noopener noreferrer" class="nav-link external">
  插件市场
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://gitee.com/vk-uni/vk-uview-ui" target="_blank" rel="noopener noreferrer" class="nav-link external">
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="DCloud插件市场" class="dropdown-title"><span class="title">VK其他插件</span> <span class="arrow down"></span></button> <button type="button" aria-label="DCloud插件市场" class="mobile-dropdown-title"><span class="title">VK其他插件</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=2204" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-unicloud-router（client端）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=5043" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-unicloud-admin（admin端）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=5642" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-uni-pay（统一支付）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=2848" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-data-goods-sku-popup（sku组件）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=6692" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-uview-ui（uView Vue3.0）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=6158" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-redis
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=6089" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-unicloud数据库一键搬家工具
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/plugin?id=6663" target="_blank" rel="noopener noreferrer" class="nav-link external">
  vk-hbx插件（开发辅助工具）
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://ext.dcloud.net.cn/publisher?id=164406" target="_blank" rel="noopener noreferrer" class="nav-link external">
  查看更多
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="原版uView" class="dropdown-title"><span class="title">原版uView</span> <span class="arrow down"></span></button> <button type="button" aria-label="原版uView" class="mobile-dropdown-title"><span class="title">原版uView</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://v1.uviewui.com/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  1.X
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-item"><!----> <a href="https://uviewui.com/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  2.X
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>起步</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="addQQGroup.html" class="sidebar-link">加QQ群交流反馈</a></li><li><a href="intro.html" class="sidebar-link">介绍</a></li><li><a href="install.html" class="sidebar-link">安装</a></li><li><a href="quickstart.html" class="sidebar-link">快速上手</a></li><li><a href="common.html" aria-current="page" class="active sidebar-link">内置样式</a></li><li><a href="feature.html" class="sidebar-link">注意事项</a></li><li><a href="nvue.html" class="sidebar-link">Nvue排错指南</a></li><li><a href="changelog.html" class="sidebar-link">更新日志</a></li><li><a href="changeGuide.html" class="sidebar-link">升级指南</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><section class="sidebar-group is-sub-group depth-1"><p class="sidebar-heading open"><span>基础组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="color.html" class="sidebar-link">Color 色彩</a></li><li><a href="icon.html" class="sidebar-link">Icon 图标</a></li><li><a href="image.html" class="sidebar-link">Image 图片</a></li><li><a href="button.html" class="sidebar-link">Button 按钮</a></li><li><a href="layout.html" class="sidebar-link">Layout 布局</a></li><li><a href="cell.html" class="sidebar-link">Cell 单元格</a></li><li><a href="badge.html" class="sidebar-link">Badge 徽标数</a></li><li><a href="tag.html" class="sidebar-link">Tag 标签</a></li></ul></section></li><li><section class="sidebar-group is-sub-group depth-1"><p class="sidebar-heading"><span>表单组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="input.html" class="sidebar-link">Input 输入框</a></li><li><a href="form.html" class="sidebar-link">Form 表单</a></li><li><a href="calendar.html" class="sidebar-link">Calendar 日历</a></li><li><a href="select.html" class="sidebar-link">Select 列选择器</a></li><li><a href="keyboard.html" class="sidebar-link">Keyboard 键盘</a></li><li><a href="picker.html" class="sidebar-link">Picker 选择器</a></li><li><a href="rate.html" class="sidebar-link">Rate 评分</a></li><li><a href="search.html" class="sidebar-link">Search 搜索</a></li><li><a href="numberBox.html" class="sidebar-link">NumberBox 步进器</a></li><li><a href="upload.html" class="sidebar-link">Upload 上传</a></li><li><a href="verificationCode.html" class="sidebar-link">VerificationCode 验证码倒计时</a></li><li><a href="field.html" class="sidebar-link">Field 输入框</a></li><li><a href="checkbox.html" class="sidebar-link">Checkbox 复选框</a></li><li><a href="radio.html" class="sidebar-link">Radio 单选框</a></li><li><a href="switch.html" class="sidebar-link">Switch 开关选择器</a></li><li><a href="slider.html" class="sidebar-link">Slider 滑动选择器</a></li></ul></section></li><li><section class="sidebar-group is-sub-group depth-1"><p class="sidebar-heading"><span>数据组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="circleProgress.html" class="sidebar-link">CircleProgress 圆形进度条</a></li><li><a href="lineProgress.html" class="sidebar-link">LineProgress 线形进度条</a></li><li><a href="table.html" class="sidebar-link">Table 表格</a></li><li><a href="countDown.html" class="sidebar-link">CountDown 倒计时</a></li><li><a href="countTo.html" class="sidebar-link">CountTo 数字滚动</a></li></ul></section></li><li><section class="sidebar-group is-sub-group depth-1"><p class="sidebar-heading"><span>反馈组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="actionSheet.html" class="sidebar-link">ActionSheet 操作菜单</a></li><li><a href="alertTips.html" class="sidebar-link">AlertTips 警告提示</a></li><li><a href="toast.html" class="sidebar-link">Toast 消息提示</a></li><li><a href="noticeBar.html" class="sidebar-link">NoticeBar 滚动通知</a></li><li><a href="topTips.html" class="sidebar-link">TopTips 顶部提示</a></li><li><a href="collapse.html" class="sidebar-link">Collapse 折叠面板</a></li><li><a href="popup.html" class="sidebar-link">Popup 弹出层</a></li><li><a href="swipeAction.html" class="sidebar-link">SwipeAction 滑动操作</a></li><li><a href="modal.html" class="sidebar-link">Modal 模态框</a></li><li><a href="fullScreen.html" class="sidebar-link">fullScreen 压窗屏</a></li></ul></section></li><li><section class="sidebar-group is-sub-group depth-1"><p class="sidebar-heading"><span>布局组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="line.html" class="sidebar-link">Line 线条</a></li><li><a href="card.html" class="sidebar-link">Card 卡片</a></li><li><a href="mask.html" class="sidebar-link">Mask 遮罩层</a></li><li><a href="noNetwork.html" class="sidebar-link">NoNetwork 无网络提示</a></li><li><a href="grid.html" class="sidebar-link">Grid 宫格布局</a></li><li><a href="swiper.html" class="sidebar-link">Swiper 轮播图</a></li><li><a href="timeLine.html" class="sidebar-link">TimeLine 时间轴</a></li><li><a href="skeleton.html" class="sidebar-link">Skeleton 骨架屏</a></li><li><a href="sticky.html" class="sidebar-link">Sticky 吸顶</a></li><li><a href="waterfall.html" class="sidebar-link">Waterfall 瀑布流</a></li><li><a href="divider.html" class="sidebar-link">Divider 分割线</a></li></ul></section></li><li><section class="sidebar-group is-sub-group depth-1"><p class="sidebar-heading"><span>导航组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="dropdown.html" class="sidebar-link">Dropdown 下拉菜单</a></li><li><a href="tabbar.html" class="sidebar-link">Tabbar 底部导航栏</a></li><li><a href="backTop.html" class="sidebar-link">BackTop 返回顶部</a></li><li><a href="navbar.html" class="sidebar-link">Navbar 自定义导航栏</a></li><li><a href="tabs.html" class="sidebar-link">tabs 标签</a></li><li><a href="tabsSwiper.html" class="sidebar-link">tabsSwiper 全屏选项卡</a></li><li><a href="subsection.html" class="sidebar-link">Subsection 分段器</a></li><li><a href="indexList.html" class="sidebar-link">IndexList 索引列表</a></li><li><a href="steps.html" class="sidebar-link">Steps 步骤条</a></li><li><a href="empty.html" class="sidebar-link">Empty 内容为空</a></li><li><a href="link.html" class="sidebar-link">Link 超链接</a></li><li><a href="section.html" class="sidebar-link">Section 查看更多</a></li></ul></section></li><li><section class="sidebar-group is-sub-group depth-1"><p class="sidebar-heading"><span>其他组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="parse.html" class="sidebar-link">Parse 富文本解析器</a></li><li><a href="messageInput.html" class="sidebar-link">MessageInput 验证码输入</a></li><li><a href="avatarCropper.html" class="sidebar-link">AvatarCropper 头像裁剪</a></li><li><a href="loadMore.html" class="sidebar-link">loadMore 加载更多</a></li><li><a href="readMore.html" class="sidebar-link">ReadMore 展开阅读更多</a></li><li><a href="lazyLoad.html" class="sidebar-link">LazyLoad 懒加载</a></li><li><a href="gap.html" class="sidebar-link">Gap 间隔槽</a></li><li><a href="avatar.html" class="sidebar-link">Avatar 头像</a></li><li><a href="loading.html" class="sidebar-link">Loading 加载动画</a></li></ul></section></li></ul></section></li></ul> </aside></div> <main class="page"> <div class="theme-default-content content__default"><h2 id="内置样式"><a href="#内置样式" class="header-anchor">#</a> 内置样式</h2> <div class="demo-model" data-v-05b12073><div class="model-content" data-v-05b12073><iframe scrolling="auto" frameborder="0" src="https://uviewdoc.fsq.pub/#/" id="demo-modal" class="iframe" data-v-05b12073></iframe></div></div> <h3 id="说明"><a href="#说明" class="header-anchor">#</a> 说明</h3> <p>uView组件功能的实现，并不依赖全局样式，内置的一些类名，只是提供一些基础且常用的样式，仅此而已。<br>
注意：请根据<a href="quickstart.html">快速上手</a>中的说明，引入uView提供的scss文件。</p> <div class="custom-block warning"><p class="custom-block-title">温馨提示</p> <p>由于uView的内置样式均是写在scss文件中的，您在使用的时候，请确保要给页面的<code>style</code>标签加上<code>lang=&quot;scss&quot;</code>属性，否则可能会报错。<br></p></div> <h3 id="文字省略"><a href="#文字省略" class="header-anchor">#</a> 文字省略</h3> <p><code>u-line-1</code>,<code>u-line-2</code>,<code>u-line-3</code>,<code>u-line-4</code>,<code>u-line-5</code>五个类名在文字超出内容盒子时，分别只显示一行、两行、三行、四行、五行+省略号。</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-line-1<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
	是日也，天朗气清，惠风和畅，仰观宇宙之大，俯察品类之盛，所以游目骋怀，足以极视听之娱，信可乐也
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>view</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h3 id="定位"><a href="#定位" class="header-anchor">#</a> 定位</h3> <p>uView内置了关于相对和绝对定位的两个类，分别为<code>u-relative</code>(<code>u-rela</code>)和<code>u-absolute</code>(<code>u-abso</code>)：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-relative,
.u-rela</span> <span class="token punctuation">{</span>
	<span class="token property">position</span><span class="token punctuation">:</span> relative<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.u-absolute,
.u-abso</span> <span class="token punctuation">{</span>
	<span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h3 id="字体大小"><a href="#字体大小" class="header-anchor">#</a> 字体大小</h3> <h4 id="_1-数值形式"><a href="#_1-数值形式" class="header-anchor">#</a> <strong>1. 数值形式</strong></h4> <p>uView为了方便用户写字体，通过SCSS生成了一套样式类，专门用于定位字体的大小。对于字体，不同用户可能有喜欢<code>px</code>，也有喜欢<code>rpx</code>单位的，
一般来说，在uni-app上，<code>rpx</code>单位最终表现出来的大小数值为<code>px</code>的两倍左右，也就是说，<code>24rpx</code>和<code>12px</code>的字体大小是差不多的。<br>
uView为此提供了一个类<code>u-font-x</code>，这个<code>x</code>为10-40之间(包含10和40)，当<code>x &gt;= 10 &amp;&amp; x &lt; 20</code>时，表现为<code>px</code>性质，当<code>x &gt;= 20 &amp;&amp; x &lt;= 40</code>时，表现为<code>rpx</code>性质。</p> <p>用法如下：</p> <ul><li>当<code>x &gt;= 10 &amp;&amp; x &lt; 20</code>时，表现为<code>px</code>性质</li></ul> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-font-13<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>view</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>这个<code>.u-font-13</code>在uView的内部样式定义为：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-font-13</span> <span class="token punctuation">{</span>
	<span class="token property">font-size</span><span class="token punctuation">:</span> 13px<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><ul><li>当<code>x &gt;= 20 &amp;&amp; x &lt;= 40</code>时，表现为<code>rpx</code>性质</li></ul> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-font-26<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>view</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>这个<code>.u-font-26</code>在uView的内部样式定义为：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-font-26</span> <span class="token punctuation">{</span>
	<span class="token property">font-size</span><span class="token punctuation">:</span> 26rpx<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h4 id="_2-断点形式"><a href="#_2-断点形式" class="header-anchor">#</a> <strong>2. 断点形式</strong></h4> <p>为了更加形象和方便记忆，uView另外提供了一套断点的字体大小，分别以<code>xs</code>、<code>sm</code>、<code>md</code>、<code>lg</code>、<code>xl</code>作为后缀，如下：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-font-xs</span> <span class="token punctuation">{</span>
	<span class="token property">font-size</span><span class="token punctuation">:</span> 22rpx<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.u-font-sm</span> <span class="token punctuation">{</span>
	<span class="token property">font-size</span><span class="token punctuation">:</span> 26rpx<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.u-font-md</span> <span class="token punctuation">{</span>
	<span class="token property">font-size</span><span class="token punctuation">:</span> 28rpx<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.u-font-lg</span> <span class="token punctuation">{</span>
	<span class="token property">font-size</span><span class="token punctuation">:</span> 30rpx<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.u-font-xl</span> <span class="token punctuation">{</span>
	<span class="token property">font-size</span><span class="token punctuation">:</span> 34rpx<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h3 id="文字对齐"><a href="#文字对齐" class="header-anchor">#</a> 文字对齐</h3> <p>uView为文字对齐定义了3个类，分别如下：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token comment">/* 文字左对齐 */</span>
<span class="token selector">.u-text-left</span> <span class="token punctuation">{</span>
	<span class="token property">text-align</span><span class="token punctuation">:</span> left<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 文字居中对齐 */</span>
<span class="token selector">.u-text-center</span> <span class="token punctuation">{</span>
	<span class="token property">text-align</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 文字右对齐 */</span>
<span class="token selector">.u-text-right</span> <span class="token punctuation">{</span>
	<span class="token property">text-align</span><span class="token punctuation">:</span> right<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h3 id="重置按钮样式"><a href="#重置按钮样式" class="header-anchor">#</a> 重置按钮样式</h3> <p>我们知道，uni-app和微信小程序的<code>button</code>按钮是自带样式的，比如边框，内边距，行高等。在某些特殊场景，我们可能会需要清除这些样式，仅仅只留下按钮文本，就像
单纯的<code>view</code>元素一样，不带预置样式，场景：<br>
在微信小程序中，我们知道<code>button</code>设置<code>open-type</code>参数为<code>getUserInfo</code>(或者分享场景)，点击按钮可以弹出让用户授权的系统弹窗，有时候我们可能需要按钮形式展现，但也有时候我们仅仅需要
&quot;点击登录/授权/分享&quot;几个字，同时具备获取相应的功能，就需要清除按钮的样式了，只需要给<code>button</code>加上<code>u-reset-button</code>类名即可。</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>button</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-reset-button<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>点击登录<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>button</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>提示：</p> <ol><li>此种场景，不建议使用uView的<code>u-button</code>组件，使用原生的<code>button</code>即可</li> <li>有时候，我们可能弹出询问用户是否想授权，可以用<code>u-modal</code>组件，此组件有一个<code>confirm-button</code>的<code>slot</code>用于替换<code>确定</code>按钮，用户点击确定，即可授权。</li></ol> <div class="language-html extra-class"><pre class="language-html"><code>/* 请在微信开发工具中运行此代码 */
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span><span class="token punctuation">&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span><span class="token punctuation">&gt;</span></span>
		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>u-modal</span> <span class="token attr-name">v-model</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>show<span class="token punctuation">&quot;</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>点击确定进行授权<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
			<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>template</span> <span class="token attr-name"><span class="token namespace">v-slot:</span>confirmButton</span><span class="token punctuation">&gt;</span></span>
				<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>button</span> <span class="token attr-name">open-type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>getUserInfo<span class="token punctuation">&quot;</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-reset-button<span class="token punctuation">&quot;</span></span> <span class="token attr-name">@getuserinfo</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>getuserinfo<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>确定<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>button</span><span class="token punctuation">&gt;</span></span>
			<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>
		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>u-modal</span><span class="token punctuation">&gt;</span></span>
		<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>u-button</span> <span class="token attr-name">@click</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>show = true<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>打开modal<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>u-button</span><span class="token punctuation">&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>view</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>template</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">&gt;</span></span><span class="token script"><span class="token language-javascript">
	<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
		<span class="token function">data</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
			<span class="token keyword">return</span> <span class="token punctuation">{</span>
				<span class="token literal-property property">show</span><span class="token operator">:</span> <span class="token boolean">true</span>
			<span class="token punctuation">}</span>
		<span class="token punctuation">}</span><span class="token punctuation">,</span>
		<span class="token literal-property property">methods</span><span class="token operator">:</span> <span class="token punctuation">{</span>
			<span class="token function">getuserinfo</span><span class="token punctuation">(</span><span class="token parameter">res</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
				console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span>res<span class="token punctuation">)</span><span class="token punctuation">;</span>
			<span class="token punctuation">}</span>
		<span class="token punctuation">}</span>
	<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h3 id="内外边距"><a href="#内外边距" class="header-anchor">#</a> 内外边距</h3> <p>uView定义了一套内外边距的类名，调用简单，方便用户使用，类似<code>u-padding-x</code>、<code>u-margin-left-x</code>等，这里的<code>x</code>取值规则如下：</p> <ul><li>1-80(可以等于80)之间的偶数(双数)</li> <li>能被5除尽的1-80之间的数，如5，10，15，35等</li></ul> <p>类名的取值有如下：</p> <p><strong>注意：</strong> uView同时也给了一套简写的方法，二者是等价的。</p> <ul><li>u-padding-x  ==  u-p-x</li> <li>u-padding-left-x  ==  u-p-l-x</li> <li>u-padding-top-x  ==  u-p-t-x</li> <li>u-padding-right-x  ==  u-p-r-x</li> <li>u-padding-bottom-x  ==  u-p-b-x</li> <li>u-margin-x  ==  u-m-x</li> <li>u-margin-left-x  ==  u-m-l-x</li> <li>u-margin-top-x  ==  u-m-t-x</li> <li>u-margin-right-x  ==  u-m-r-x</li> <li>u-margin-bottom-x  ==  u-m-b-x</li></ul> <p>如果我们想定义<code>26rpx</code>的<strong>左外边距</strong>：</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-margin-left-26<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>viwe</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>这个<code>.u-margin-left-26</code>在uView的内部样式定义为：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-margin-left-26</span> <span class="token punctuation">{</span>
	<span class="token property">margin-left</span><span class="token punctuation">:</span> 26rpx<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><p>如果我们想要<code>35rpx</code>的内边距：</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-padding-35<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>viwe</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>这个<code>.u-padding-35</code>在uView的内部样式定义为：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-padding-35</span> <span class="token punctuation">{</span>
	<span class="token property">padding</span><span class="token punctuation">:</span> 35rpx<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h3 id="flex布局"><a href="#flex布局" class="header-anchor">#</a> flex布局</h3> <p>在看这个部分的时候，请确保您对<code>flex</code>是了解的，否则可以参考<a href="http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html" target="_blank" rel="noopener noreferrer">阮一峰的flex教程<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a><br>
由于我们经常要使用<code>flex</code>布局，而其中的大部分样式又都是重复的，总是少不了如下的几句：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token comment">/* 父盒子 */</span>
<span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
<span class="token property">flex-wrap</span><span class="token punctuation">:</span> wrap<span class="token punctuation">;</span>
<span class="token property">flex-direction</span><span class="token punctuation">:</span> row<span class="token punctuation">;</span>
<span class="token property">align-items</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>

<span class="token comment">/* 子元素 */</span>
<span class="token property">flex</span><span class="token punctuation">:</span> 1<span class="token punctuation">;</span>
</code></pre></div><p>基于以上，uView定义了一个最常用的总集合类，名为<code>u-flex</code>，其内部值如下：</p> <h4 id="_1-总超集"><a href="#_1-总超集" class="header-anchor">#</a> <strong>1. 总超集</strong></h4> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-flex</span> <span class="token punctuation">{</span>
	<span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
	<span class="token property">flex-direction</span><span class="token punctuation">:</span> row<span class="token punctuation">;</span>
	<span class="token property">align-items</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h4 id="_2-子元素是否换行"><a href="#_2-子元素是否换行" class="header-anchor">#</a> <strong>2. 子元素是否换行</strong></h4> <div class="language-css extra-class"><pre class="language-css"><code><span class="token comment">/* 换行 */</span>
<span class="token selector">.u-flex-wrap</span> <span class="token punctuation">{</span>
	<span class="token property">flex-wrap</span><span class="token punctuation">:</span> wrap<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 不换行 */</span>
<span class="token selector">.u-flex-nowrap</span> <span class="token punctuation">{</span>
	<span class="token property">flex-wrap</span><span class="token punctuation">:</span> nowrap<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><div class="custom-block tip"><p class="custom-block-title">提示</p> <p>当我们写这些跟<code>flex</code>相关的类名时，总应该把<code>u-flex</code>写在<code>class</code>多个类名的左边，因为<code>u-flex</code>是一个集合类，如果你不想要其中的某个属性，如<code>align-items: center</code>
，可以通过右边的类名覆盖它。</p></div> <p>覆盖<code>u-flex</code>中的<code>align-items: center</code>(对齐)，改为顶部对齐<code>u-col-top</code>：</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-flex u-col-top<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
	......
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>view</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>最终内部表现如下(其它以此类推)：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-flex</span> <span class="token punctuation">{</span>
	<span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
	<span class="token property">flex-direction</span><span class="token punctuation">:</span> row<span class="token punctuation">;</span>
	<span class="token property">align-items</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 由于align-items: flex-start在后面，故覆盖了&quot;u-flex&quot;的align-items: center */</span>
<span class="token selector">.u-col-top</span> <span class="token punctuation">{</span>
	<span class="token property">align-items</span><span class="token punctuation">:</span> flex-start<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h4 id="_3-子元素在上下左右的对齐方式"><a href="#_3-子元素在上下左右的对齐方式" class="header-anchor">#</a> <strong>3. 子元素在上下左右的对齐方式</strong></h4> <p>这里类名的命名依据为，<code>col</code>为<code>column</code>(列，竖向)的缩写，<code>row</code>为行的意思(横向)，所以就有垂直方向上的诸如<code>u-col-center</code>表
垂直居中对齐，<code>u-row-left</code>代表水平左对齐。<br>
此类名控制的是子元素，是需要写在父元素盒子上的：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token comment">/* 垂直居中 */</span>
<span class="token selector">.u-col-center</span> <span class="token punctuation">{</span>
	<span class="token property">align-items</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 顶部对齐 */</span>
<span class="token selector">.u-col-top</span> <span class="token punctuation">{</span>
	<span class="token property">align-items</span><span class="token punctuation">:</span> flex-start<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 底部对齐 */</span>
<span class="token selector">.u-col-bottom</span> <span class="token punctuation">{</span>
	<span class="token property">align-items</span><span class="token punctuation">:</span> flex-end<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 左边对齐 */</span>
<span class="token selector">.u-row-left</span> <span class="token punctuation">{</span>
	<span class="token property">justify-content</span><span class="token punctuation">:</span> flex-start<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 水平居中 */</span>
<span class="token selector">.u-row-center</span> <span class="token punctuation">{</span>
	<span class="token property">justify-content</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 右边对齐 */</span>
<span class="token selector">.u-row-right</span> <span class="token punctuation">{</span>
	<span class="token property">justify-content</span><span class="token punctuation">:</span> flex-end<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 水平两端对齐，项目之间的间隔都相等 */</span>
<span class="token selector">.u-row-between</span> <span class="token punctuation">{</span>
	<span class="token property">justify-content</span><span class="token punctuation">:</span> space-between<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* 水平每个项目两侧的间隔相等，所以项目之间的间隔比项目与父元素两边的间隔大一倍 */</span>
<span class="token selector">.u-row-around</span> <span class="token punctuation">{</span>
	<span class="token property">justify-content</span><span class="token punctuation">:</span> space-around<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h4 id="_4-子元素空间分布"><a href="#_4-子元素空间分布" class="header-anchor">#</a> <strong>4. 子元素空间分布</strong></h4> <p>此类名是写在子元素的<code>class</code>中的，主要用于决定子元素占据的父元素的空间大小，类名为<code>u-flex-x</code>，<code>x</code>的取值为<code>x &gt;= 1 &amp;&amp; x &lt;= 12</code>：</p> <div class="language-css extra-class"><pre class="language-css"><code><span class="token selector">.u-flex-1</span> <span class="token punctuation">{</span>
	<span class="token property">flex</span><span class="token punctuation">:</span> 1<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.u-flex-2</span> <span class="token punctuation">{</span>
	<span class="token property">flex</span><span class="token punctuation">:</span> 2<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">.u-flex-3</span> <span class="token punctuation">{</span>
	<span class="token property">flex</span><span class="token punctuation">:</span> 3<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token comment">/* ...... */</span>

<span class="token selector">.u-flex-12</span> <span class="token punctuation">{</span>
	<span class="token property">flex</span><span class="token punctuation">:</span> 12<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</code></pre></div><h3 id="边框"><a href="#边框" class="header-anchor">#</a> 边框</h3> <p>uni-app，iOS和少数设备使用<code>1rpx</code>是能够得到类似<code>0.5px</code>的半像素宽度的，但是某些情况下是不兼容的，
故uView提供了一套兼容的css类名，方便用户使用。<br> <code>u-border</code>表示给元素添加四周的边框，<code>u-border-top</code>为上边框，<code>u-border-right</code>为右边框，
<code>u-border-bottom</code>为下边框，<code>u-border-left</code>为左边框。<br>
说明：如果想调整边框与内容的距离，修改元素的内边距即可。</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-border-bottom<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
	夫人之相与，俯仰一世，或取诸怀抱，悟言一室之内；或因寄所托，放浪形骸之外
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>view</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h3 id="文字颜色"><a href="#文字颜色" class="header-anchor">#</a> 文字颜色</h3> <p>uView提供了四个关于文字的颜色，具体详见文档的<a href="color.html">Color 色彩</a>部分，分别是：</p> <ul><li><code>main-color</code>主要颜色，可以用于标题等需要重颜色的场景</li> <li><code>content-color</code>内容颜色，可以用于一般性内容的场景</li> <li><code>tips-color</code>提示颜色，可以用于浅颜色的提示语的场景</li> <li><code>light-color</code>为比<code>tips-color</code>更浅的颜色，可以和<code>tips-color</code>搭配使用</li></ul> <p>举个例子：<br>
我们平时看到的APP的新闻列表，标题颜色可以用<code>$u-main-color</code>，简介部分颜色可以用<code>$u-content-color</code>，底部的发布时间文字等可以用<code>$u-tips-color</code>。</p> <h4 id="_1-类名方案"><a href="#_1-类名方案" class="header-anchor">#</a> <strong>1. 类名方案</strong></h4> <p>这个方案，直接通过类名调用，有这几个对应类名：<code>u-main-color</code>、<code>u-content-color</code>、<code>u-tips-color</code>、<code>u-light-color</code>。</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>view</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>u-main-color<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
	......
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>view</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h4 id="_2-scss变量名方案"><a href="#_2-scss变量名方案" class="header-anchor">#</a> <strong>2. SCSS变量名方案</strong></h4> <p>uView提供了四个关于文字颜色的scss变量名，具体详见文档的<a href="color.html">Color 色彩</a>部分，分别是：</p> <ul><li><code>$u-main-color</code></li> <li><code>$u-content-color</code></li> <li><code>$u-tips-color</code></li> <li><code>$u-light-color</code></li></ul> <div class="language-html extra-class"><pre class="language-html"><code><span class="token comment">&lt;!-- 请确保在style标签声明了&quot;lang=&quot;scss&quot;&quot; --&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>scss<span class="token punctuation">&quot;</span></span> <span class="token attr-name">scoped</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
	<span class="token selector">.box</span> <span class="token punctuation">{</span>
		<span class="token property">color</span><span class="token punctuation">:</span> $u-main-color<span class="token punctuation">;</span>
	<span class="token punctuation">}</span>

	<span class="token selector">.count</span> <span class="token punctuation">{</span>
		<span class="token property">border-color</span><span class="token punctuation">:</span> $u-light-color<span class="token punctuation">;</span>
	<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h3 id="主题色"><a href="#主题色" class="header-anchor">#</a> 主题色</h3> <p>uView提供五个关于主题的scss颜色变量，如有需要，可合理使用。具体详见文档的<a href="color.html">Color 色彩</a>部分，分别是：</p> <ul><li><code>$u-type-primary</code>为蓝色，uView的主色彩，代表热情，友好，积极，向上之意。</li> <li><code>$u-type-warning</code>为黄色，代表警告之意。</li> <li><code>$u-type-success</code>为绿色，代表成功之意。</li> <li><code>$u-type-error</code>为红色，代表错误之意。</li> <li><code>$u-type-info</code>为灰色，代表一般信息之意。</li></ul> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>scss<span class="token punctuation">&quot;</span></span> <span class="token attr-name">scoped</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
	<span class="token selector">.item</span> <span class="token punctuation">{</span>
		<span class="token property">color</span><span class="token punctuation">:</span> $u-type-primary<span class="token punctuation">;</span>
	<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
</code></pre></div></div> <footer class="page-edit"><!----> <div class="edit-link"><a href="https://gitee.com/vk-uni/vk-uview-ui-doc.git/edit/master/docs/components/common.md" target="_blank" rel="noopener noreferrer">编辑此页（一起来纠错与优化，方便你我Ta）</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">最后修改时间:</span> <span class="time">5/26/2023, 11:47:04 AM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="quickstart.html" class="prev">
        快速上手
      </a></span> <span class="next"><a href="feature.html">
        注意事项
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
		<script src="../assets/js/app.06a5b7ec.js" defer></script><script src="../assets/js/3.b1cc55a0.js" defer></script><script src="../assets/js/4.4b844322.js" defer></script><script src="../assets/js/75.b4e8bf21.js" defer></script><script src="../assets/js/9.ba52e2b0.js" defer></script><script src="../assets/js/6.2c513bee.js" defer></script>
	</body>

<!-- Mirrored from vkuviewdoc.fsq.pub/components/common.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 May 2025 17:31:00 GMT -->
</html>
